#ifndef GENERICRENAMEDIALOG_H
#define GENERICRENAMEDIALOG_H

#include <QDialog>
#include <ui_genericrenamewidget.h>
#include <grouptreeitem.h>

class GenericRenameDialog : public QDialog
{
  Q_OBJECT
private:
  Ui::GenericRenameWidget _gui;

  QString _catgoryBaseName;

public:
  GenericRenameDialog(QWidget *parent = 0);

  void SetType (const QString& mode, const QString& type);
  void SetType (const QString& type);

  void SetCategory (const Category& category, bool chopBaseName = true);
  Category GetCategory ();

  void SetName (const QString& name);
  QString GetName () const;

  void HideCategory ();
  void HideName ();

  static Category GetCategory (QWidget* parent, const QString& mode, const QString& type, const Category& category);
  static QString GetName (QWidget* parent, const QString& mode, const QString& type, const QString& name, bool returnNull = true);
private slots:
  void on_pushButtonOk_clicked ();
  void on_pushButtonCancel_clicked ();

signals:

public slots:

};

#endif // GENERICRENAMEDIALOG_H
